// TOWN DIALOGUE SCRIPT
//    Town 141: Libras

begintalkscript;

variables;

short i,j,k,r1,choice;

// Vincent

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 1;
	question = "Vincent";
	text1 = "The inn is run by a pale, bland man. You notice he has a bundle of tickets at his belt.";
	text2 = "He stares at you and scratches his nose. You ask his name. He says _Vincent,_ in a flat voice. You think he's had a few drinks.";
	text5 = "Vincent looks at you blandly. He seems like he is drunk, but there is no alcohol near him, and his breath doesn't smell of it.";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_What can I get here?_";
	text1 = "_You can get a room for the night for a mere ten coins. We have fine Karnold whiskey for twelve coins._";
	text2 = "Finally, I have boat tickets to Lost Isle for fifteen coins._ His voice is so dull and soft that you almost have to struggle to pay attention.";

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_What are the tickets for?_";
	text1 = "_I have tickets to Lost Isle. It's a town on the Remote Isle to the south. Nice town. Very peaceful. You can purchase tickets for your group for only fifteen coins, round trip._";

begintalknode;
	state = 2;
	nextstate = -1;
	question = "_Your voice is very quiet. Could you speak up?_";
	text1 = "_Sorry if I seem a little flat. Nasty break-up. Long story. Not going to tell it._ If he's telling the truth, he really doesn't seem to care about it.";

begintalknode;
	state = 2;
	nextstate = -1;
	condition = coins_amount() >= 15;
	question = "_I'd like to buy some tickets._ Pay fifteen coins.";
	text1 = "He peels you off a few tickets. _Go to the docks at the south end of town and get on the boat. And thank you for your business._";
	text5 = "You have already bought this.";
	code =
		if (gf(141,1) > 0)
			rs(1);
			else {
				rs(5);
				change_coins(-15);
				sf(141,1,1);
				}
	break;
	
begintalknode;
	state = 2;
	nextstate = -1;
	condition = coins_amount() >= 10;
	question = "_A room please._ Pay ten coins.";
	text1 = "_How nice,_ he says, in an entirely uninterested voice. He shows you to your room.";
	action = END_TALK;	
	code =
		revive_party();
		change_coins(-10);
		relocate_char(get_pc_id(0),14,31,FALSE);
		relocate_char(get_pc_id(1),15,31,FALSE);
		relocate_char(get_pc_id(2),15,32,FALSE);
		relocate_char(get_pc_id(3),14,32,FALSE);
	break;

begintalknode;
	state = 2;
	nextstate = -1;
	condition = coins_amount() >= 12;
	question = "_Whiskey for all, please._ Pay twelve coins.";
	text1 = "He quietly pours you several glasses of vicious brown whiskey. You drink it, and, for a few minutes, you can see angels.";
	text3 = "_Karnold Province whiskey is the finest, sir._";
	code =
		force_char_status(30000,1,20);
		change_coins(-12);
	break;

begintalknode;
	state = 2;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_Oh._";
	action = END_TALK;

// Dot

begintalknode;
	tag = 60;
	state = -1;
	nextstate = 29;
	question = "Dot";
	text1 = "There is a quiet woman with a sweet smile siting behind the counter. She is carefully scrubbing clean a few freshly picked bunches of leaves. A fresh, fragrant, herbal smell hangs heavy in the air. _I'm Dot. Welcome!_";
	text5 = "She continues to carefully clean the leaves while speaking to you. _Anything else, visitor?_";
	action = INTRO;

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_What trade are you in?_";
	text1 = "_Well, I know a few spells, I do confess it, but I'm an herbalist by trade. I collect herbs!_";
	text3 = "_Well, I know a few spells, I do confess it, but I'm an herbalist by trade. I collect herbs! So I do some things an Anama like you would approve of, and some you won't._";
	code =
		if (has_spec_item(40) == 0)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 30;
	nextstate = -1;
	question = "_Can you teach me any spells?_";
	text1 = "She laughs. _Oh, you wouldn't want to learn spells from me. I wouldn't know how to teach them! You might try throwing a bolt of flame and end up making all your hair fall out! Or worse!_";
	text2 = "_No, the main thing I have to offer is herbs!_";

begintalknode;
	state = 30;
	nextstate = 31;
	question = "_What sort of herbs do you sell?_";
	text1 = "_Alchemical herbs! I have a good supply of some of the more effective ones. You can purchase them if you wish._";
	text2 = "She sighs. _Now if I could find some mandrake to sell! Then I'd be rich!_";

begintalknode;
	state = 31;
	nextstate = -1;
	question = "_Can you make potions?_";
	text1 = "_Sorry, no. I just connect and prepare the ingredients. I know there is a good alchemist in Shayder, to the west._";

begintalknode;
	state = 29;
	nextstate = -1;
	question = "_Can I buy some of your herbs?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Dot's Herbs","Dot has worked very hard to find this selection of rare alchemical herbs. She has many varieties, including some which you could use to make potions.",68,3,3);
	break;

begintalknode;
	state = 31;
	nextstate = 32;
	question = "_What do you know about mandrake?_";
	text1 = "_The king of herbs, magically potent in the extreme! I'd love to be able to find a good supply of it. I've heard others have, but I think that's only a rumor._";

begintalknode;
	state = 32;
	nextstate = -1;
	question = "_What's the rumor?_";
	text1 = "_I've heard there's a hermit that lives on an island somewhere east or north or somewhere, who sells mandrake. Just a rumor, though, I'm sure._";

begintalknode;
	state = 29;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_All right! Bye!_";
	action = END_TALK;

// Mervin

begintalknode;
	tag = 80;
	state = -1;
	nextstate = 57;
	question = "Mervin";
	text1 = "You meet a massive merchant, decked out in fine silken clothes. He has thinning hair and a pockmarked face. He'd be completely unappealing if he didn't clearly have so much money.";
	text2 = "He noisily clears his throat. _Just call me Mervin._";
	text5 = "Mervin reclines a bit. He has the aura of pure confidence usually only seen in the very rich.";
	action = INTRO;

begintalknode;
	state = 57;
	nextstate = 58;
	question = "_What sort of business do you run?_";
	text1 = "_I run this end of the Eastern Trade Route. You know, we're always looking for good couriers!_";

begintalknode;
	state = 58;
	nextstate = -1;
	question = "_What use are the trade routes?_";
	text1 = "He sighs contentedly. _Ah, Eastern Valorim. Few people. Many resources. All it takes is merchants to arrange getting the goods in and out and good couriers to do the job._";
	text2 = "He looks you over. _You look like you have good courier potential!_";

begintalknode;
	state = 58;
	nextstate = 59;
	question = "_What does a courier do?_";
	text1 = "_It's very simple and very profitable. Squiggus, a town up the coast to the east, gathers and processes fine, savory herbs. We send fine clothes to them, to keep them alive out in the wilderness._";
	text2 = "_You purchase goods here, sell them in Squiggus, and bring their savory herbs back here, where I buy them. Profit for you. Interested?_";

begintalknode;
	state = 59;
	nextstate = 57;
	question = "_I'm interested._";
	text1 = "_Excellent. Come to me when you want to purchase goods or sell me herbs._";
	action = SET_SDF 141 11 1;
	code =
		toggle_quest(48,1);
	break;
	
begintalknode;
	state = 57;
	nextstate = -1;
	condition = gf(141,11) >= 1 && party_has_item(579) > 0;
	question = "_I have herbs from Squiggus._";
	code =
		run_hardcode(137);
	break;

begintalknode;
	state = 57;
	nextstate = -1;
	condition = gf(141,11) >= 1;
	question = "_I'll buy some clothes to sell in Squiggus._";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Trade Goods","Mervin offers you thick packs of well-made, warm clothes to be transported to Squiggus. It's a tiny town up along the east coast.",69,3,3);
	break;

begintalknode;
	state = 57;
	nextstate = -1;
	condition = 1;
	question = "_That is all I need._";
	text1 = "_Understood. Come back if you want to make some money._";
	action = END_TALK;

begintalknode;
	state = 59;
	nextstate = 57;
	question = "_Not interested._";
	text1 = "_That's probably for the best. I don't like trusting my fine goods to dirty, dishonest nephilim. No offense._";
	text3 = "_Oh well. The job is still open. You look like experienced travelers. The kind I like._";
	code =
		if (species_in_party(2))
			remove_string(3);
			else remove_string(1);
	break;

